package com.zj.config;

import com.zj.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 自己的名字
 * @version 1.0.0
 * @ClassName InterceptorConfig
 * @Description
 * @createTime 2024年12月17日 21:31
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/api/account/*/**")
                .excludePathPatterns("/api/account/*/login");
    }
}
